using System;

namespace System.IO {
  /// <summary>
  /// File Type Map.
  /// </summary>
  public abstract class FileTypeMap {

    /// <summary>
    /// Initializes a new instance of the <see cref="FileTypeMap"/> class.
    /// </summary>
    public FileTypeMap ( ) {

    }

    /// <summary>
    /// Static constructor of the <see cref="FileTypeMap"/> class.
    /// </summary>
    static FileTypeMap ( ) {
			DefaultFileTypeMap = new MimetypesFileTypeMap ( );
    }

    /// <summary>
    /// Gets or sets the default file type map.
    /// </summary>
    /// <value>The default file type map.</value>
		public static FileTypeMap DefaultFileTypeMap { get; private set; }

    /// <summary>
    /// Gets the content type of the file.
    /// </summary>
    /// <param name="file">The file.</param>
    /// <returns>The content type</returns>
    public abstract string GetContentType ( FileInfo file );
    /// <summary>
    /// Gets the content type of the file.
    /// </summary>
    /// <param name="fileName">The file name.</param>
    /// <returns>The content type</returns>
    public abstract string GetContentType ( string fileName );
  }
}
